var Main = {
	
	_pageStyle: 'inline-block',
	
	init: function() {
		this._setupButtons()
/* 		this.goTo('LoginPage') */
		this.goTo('GamePage')
	},
	
	//set up anchor buttons to flash on focus events
	_setupButtonsFn: [
		function() { return false },
	],
	_setupButtons: function() {
		var a = document.getElementsByTagName('a'),
			regexp = /\s*button\s*/
		
		for (var i=0; i<a.length; i++) {
			if ( a[i].className.match(regexp) ) {
				a[i].onmousedown = this._setupButtonsFn[0]
			}
		}
	},
	
	//logic required to go to page
	goTo: function(id) {
		if (typeof this._currentPage !== 'undefined') {
			this._currentPage.style.display = 'none'
		}
		
		this._currentPage = document.getElementById(id)
		this._currentPage.style.display = this._pageStyle
	}
	
}